package ink.ykb.j2CacheDemo.service;

import org.beetl.sql.core.SQLManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ink.ykb.j2CacheDemo.dao.DepartmentDao;
import ink.ykb.j2CacheDemo.entity.Department;



@Service
@Transactional
public class DepartService {

	private Logger logger = LoggerFactory.getLogger(DepartService.class);  
	@Autowired
	private SQLManager sqlManager;
	@Autowired
	private DepartmentDao departmentDao;
	
	
	
	public Department getDepartment(Integer id) {
		Department depart = departmentDao.single(id);
		return depart;
	}
	public Department updateDepartment(Department department) {
		departmentDao.updateById(department);
		return department;
	}
	
}
